package com.mishitech.curso;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import org.apache.struts.action.ActionForm;
import org.apache.struts.action.ActionForward;
import org.apache.struts.action.ActionMapping;
import org.apache.struts.action.ExceptionHandler;
import org.apache.struts.config.ExceptionConfig;

public class Error extends ExceptionHandler {

	public ActionForward execute(Exception exception, ExceptionConfig config, 
				ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) {
		
		System.out.println("===");
		System.out.println(exception.getMessage());
		System.out.println("===");
		
		return mapping.findForward("fail");
	}

}
